home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1997 December / MACPOWER-1997-12.ISO.7z / MACPOWER-1997-12.ISO / AMUG / PROGRAMMING / Raven 1.2 Examples.sit / Raven 1.2 Examples / Quill / Source / PenDialog.h < prev    next >
Text File  |  1997-08-14  |  2KB  |  72 lines

  1. /*
  2.  *    File:        PenDialog.h
  3.  *    Function:    A dialog that allows the user to edit an SPen.
  4.  *    Written by:    Jesse Jones
  5.  *
  6.  *  Copyright ゥ 1997 Jesse Jones. 
  7.  *    For conditions of distribution and use, see copyright notice in ZTypes.h  
  8.  *
  9.  *    Change History (most recent first):
  10.  *
  11.  *         <1>     5/04/97    JDJ        Created
  12.  */
  13.  
  14. #pragma once
  15.  
  16. #include <ZDialogBox.h>
  17. #include <ZTextBox.h>
  18.  
  19.  
  20. // ===================================================================================
  21. //    class CPenDialog
  22. // ===================================================================================
  23. class CPenDialog : public TDialogBox, public MListener<TTextBox*> {
  24.     
  25.     typedef TDialogBox Inherited;
  26.     
  27. //-----------------------------------
  28. //    Initialization/Destruction
  29. //
  30. public:
  31.     virtual               ~CPenDialog();
  32.     
  33.     static    bool         Pose(const string& penName, const SPen& oldPen, SPen* newPen);
  34.         
  35.     static     MReanimatable* Create(MReanimatable* parent);
  36.  
  37. protected:
  38.                         CPenDialog();
  39.                         
  40. //-----------------------------------
  41. //    Inherited API
  42. //
  43. public:
  44.     virtual bool         HandleMouseDown(const TMouseEvent& event);
  45.  
  46.     virtual bool         HandleContextMenu(const TMouseEvent& event);
  47.  
  48. protected:
  49.     virtual void         OnReanimated();
  50.     
  51.     virtual void         OnBroadcast(const SControlMessage& mesg);
  52.  
  53.     virtual void         OnBroadcast(TTextBox* const& mesg);
  54.  
  55.     virtual bool         OnMenuCommand(const MenuCommand& command);
  56.  
  57. //-----------------------------------
  58. //    Internal API
  59. //
  60. protected:
  61.             void         SetData(const SPen& traits);
  62.             
  63.             SPen        GetData() const;
  64.                                     
  65. //-----------------------------------
  66. //    Member data
  67. //
  68. protected:
  69.     SPen    mOldInfo;
  70. };
  71.  
  72.